package com.vector.demo.service.impl;

import com.vector.demo.mapper.AssignmentMapper;
import com.vector.demo.pojo.Assignment;
import com.vector.demo.service.AssignmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AssignmentServiceImpl implements AssignmentService {

    @Autowired
    AssignmentMapper assignmentMapper;

    @Override
    public int addAssignment(Assignment assignment) {
        return assignmentMapper.addAssignment(assignment);
    }

    @Override
    public Assignment dropAssignmentById(int ass_id) {
        return assignmentMapper.dropAssignmentById(ass_id);
    }

    @Override
    public Assignment dropAssignmentByTeacher(String ass_teacher) {
        return assignmentMapper.dropAssignmentByTeacher(ass_teacher);
    }

    @Override
    public Assignment dropAssignmentByClass(String ass_class) {
        return assignmentMapper.dropAssignmentByClass(ass_class);
    }

    @Override
    public Assignment dropAssignmentByStudent(String ass_student) {
        return assignmentMapper.dropAssignmentByStudent(ass_student);
    }

    @Override
    public int modifyAssignmentContent(Assignment assignment) {
        return assignmentMapper.modifyAssignmentContent(assignment);
    }

    @Override
    public int modifyAssignmentGrade(Assignment assignment) {
        return assignmentMapper.modifyAssignmentGrade(assignment);
    }

    @Override
    public List<Assignment> selectAssignment(String ass_class) {
        return assignmentMapper.selectAssignment(ass_class);
    }

    @Override
    public List<Assignment> selectAssignment1(String ass_class) {
        return assignmentMapper.selectAssignment1(ass_class);
    }

    @Override
    public List<Assignment> selectAssignment2(String ass_teacher, String ass_class) {
        return assignmentMapper.selectAssignment2(ass_teacher, ass_class);
    }

    @Override
    public int updateGrade(String grade, int status, int id) {
        return assignmentMapper.updateGrade(grade, status, id);
    }

    @Override
    public Assignment selectAssignmentById(int ass_id) {
        return assignmentMapper.selectAssignmentById(ass_id);
    }

}
